package com.bw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bw.dao.UsernameMapper;
import com.bw.entity.Username;
import com.bw.service.UsernameService;

@Service(value = "usernameService")
public class UsernameServiceImpl implements UsernameService {

    @Autowired
    private UsernameMapper<Username>usernameMapper;
    
    @Override
    public Integer insertSelective(Username username) throws Exception {
           return this.usernameMapper.insertSelective(username);
        }

    @Override
    public Integer insertBatch(List<Username> username) throws Exception {
           return this.usernameMapper.insertBatch(username) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.usernameMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.usernameMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Username username) {
           return this.usernameMapper.updateByPrimaryKeySelective(username);
    }

    @Override
    public Username findById(Object id) {
           return (Username) this.usernameMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Username> selectByCondition(Username username) {
           return (List<Username>) this.usernameMapper.selectByCondition(username);
    }

    @Override
    public Integer selectCountByCondition(Username username) {
           return  this.usernameMapper.selectCountByCondition(username);
    }

}
